package com.ponhu.ea2.stockcenter.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.UUID;

/**
 * 对接WMS系统sku信息
 */
@Data
@Accessors(chain = true)

@ApiModel(value = "对接WMS系统sku信息")
public class WMSInventoryInfo implements Serializable {

    @ApiModelProperty(value = "批次编码")
    private String batchCode;

    /**
     * 货品编码
     */
    @ApiModelProperty(value = "货品编码")
    private String inventoryCode;

    /**
     * 货品数量(区分正负)
     */
    @ApiModelProperty(value = "货品数量(区分正负)")
    private Integer inventoryQuantity;

    /**
     * 唯一标识
     */
    @ApiModelProperty(value = "唯一标识")
    private String uniqueCode = UUID.randomUUID().toString().replaceAll("-", "");

    public Integer getInventoryQuantityAbs() {
        return Math.abs(inventoryQuantity);
    }

}
